﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace King.Engine
{
    /// <summary>
    /// Helper class for math functions
    /// </summary>
    public class MathUtil
    {

        /// <summary>
        /// Performs a true, algebraic modulus operation
        /// </summary>
        public static int TrueMod(int val, int mod)
        {
            return (mod + (val % mod)) % mod;
        }

    }
}
